cmake_minimum_required(VERSION 2.8)

# CMakeLists variables
# Indirection lvl to the root of the project
set(INDIRECTION_LVL ${CMAKE_CURRENT_SOURCE_DIR}/../..)
set(DEPENDENCY_PATH ${INDIRECTION_LVL}/Dependencies)

# Project settings
set(reflection PROJECT_NAME)

# Compilation option
if (${CMAKE_CXX_COMPILER_ID} STREQUAL "Clang")
	set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=gnu++11 -Wno-reorder -Wno-switch-enum")
elseif (${CMAKE_CXX_COMPILER_ID} STREQUAL "GNU")
	set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=gnu++0x")
endif ()


set(HEADERS
	ArrayType.classdef.h
	ArrayType.h
	Block.h
	Class.classdef.h
	Class.h
	ClassExtension.classdef.h
	ClassExtension.h
	ClassType.classdef.h
	ClassType.h
	Collection.classdef.h
	Collection.h
	Constant.classdef.h
	Constant.h
	ConstArrayType.classdef.h
	ConstArrayType.h
	ConstDataPointerType.classdef.h
	ConstDataPointerType.h
	ConstReferenceType.classdef.h
	ConstReferenceType.h
	Constructor.classdef.h
	Constructor.h
	ContainerClass.classdef.h
	ContainerClass.h
	DataMember.classdef.h
	DataMember.h
	DataPointerType.classdef.h
	DataPointerType.h
	Enum.classdef.h
	Enum.h
	Function.classdef.h
	Function.h
	InstanceDataMember.classdef.h
	InstanceDataMember.h
	InstanceMemberFunction.classdef.h
	InstanceMemberFunction.h
	IteratorConstant.classdef.h
	IteratorConstant.h
	IteratorVariable.classdef.h
	IteratorVariable.h
	LanguageElement.classdef.h
	LanguageElement.h
	LocalVariable.h
	Location.h
	MapContainerClass.classdef.h
	MapContainerClass.h
	Member.classdef.h
	Member.h
	MemberFunction.classdef.h
	MemberFunction.h
	Namespace.classdef.h
	Namespace.h
	PODStruct.classdef.h
	PODStruct.h
	PODUnion.classdef.h
	PODUnion.h
	PointerType.classdef.h
	PointerType.h
	PrimitiveType.classdef.h
	PrimitiveType.h
	Property.classdef.h
	Property.h
	PureVirtualMemberFunction.classdef.h
	PureVirtualMemberFunction.h
	ReferenceType.classdef.h
	ReferenceType.h
	SequentialContainerClass.classdef.h
	SequentialContainerClass.h
	SetContainerClass.classdef.h
	SetContainerClass.h
	Signal.classdef.h
	Signal.h
	Signature.classdef.h
	Signature.h
	SourceFile.classdef.h
	SourceFile.h
	StaticDataMember.classdef.h
	StaticDataMember.h
	StaticMemberFunction.classdef.h
	StaticMemberFunction.h
	StaticVariable.classdef.h
	StaticVariable.h
	Subroutine.classdef.h
	Subroutine.h
	SubValueMember.classdef.h
	SubValueMember.h
	TemplateElement.classdef.h
	TemplateElement.h
	TemplateSpecialization.classdef.h
	TemplateSpecialization.h
	Type.classdef.h
	Type.h
	Union.classdef.h
	Union.h
	ValueMember.classdef.h
	ValueMember.h
	ValueMemberBinding.classdef.h
	ValueMemberBinding.h
	Variable.classdef.h
	Variable.h
	VirtualMemberFunctionTable.classdef.h
	VirtualMemberFunctionTable.h
	)

set(SOURCES
	ArrayType.cpp
	Block.cpp
	Class.cpp
	ClassExtension.cpp
	ClassType.cpp
	Collection.cpp
	Constant.cpp
	ConstArrayType.cpp
	ConstDataPointerType.cpp
	ConstReferenceType.cpp
	Constructor.cpp
	ContainerClass.cpp
	DataMember.cpp
	DataPointerType.cpp
	Enum.cpp
	Function.cpp
	InstanceDataMember.cpp
	InstanceMemberFunction.cpp
	IteratorConstant.cpp
	IteratorVariable.cpp
	LanguageElement.cpp
	LocalVariable.cpp
	Location.cpp
	MapContainerClass.cpp
	Member.cpp
	MemberFunction.cpp
	Namespace.cpp
	PODStruct.cpp
	PODUnion.cpp
	PointerType.cpp
	PrimitiveType.cpp
	Property.cpp
	PureVirtualMemberFunction.cpp
	ReferenceType.cpp
	SequentialContainerClass.cpp
	SetContainerClass.cpp
	Signal.cpp
	Signature.cpp
	SourceFile.cpp
	StaticDataMember.cpp
	StaticMemberFunction.cpp
	StaticVariable.cpp
	Subroutine.cpp
	SubValueMember.cpp
	TemplateElement.cpp
	TemplateSpecialization.cpp
	Type.cpp
	Union.cpp
	ValueMember.cpp
	ValueMemberBinding.cpp
	Variable.cpp
	VirtualMemberFunctionTable.cpp
	)

source_group("" FILES ${HEADERS} ${SOURCES})

add_library(${LIB_NAME} STATIC ${HEADERS} ${SOURCES} ${INLINES})
